package com.tom.demo.controller.stockmarket;
import com.github.pagehelper.PageInfo;
import com.tom.demo.common.entity.StockMarketAsync;
import com.tom.demo.service.stockmarket.StockMarketAsyncService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
@Api(tags = {"分页测试"})
@RestController
@RequestMapping("stockMarketAsync")
public class StockMarketAsyncController {

    @Resource
    private StockMarketAsyncService stockMarketAsyncService;

    @ApiOperation(value = "mysql股市列表分页")
    @PostMapping("/pageList")
    public ResponseEntity<PageInfo<StockMarketAsync>> pageList(@RequestParam(value = "page",defaultValue = "1")Integer page,
                                             @RequestParam(value = "pageSize",defaultValue = "10")Integer pageSize) {
        return stockMarketAsyncService.pageList(page,pageSize);

    }
}
